
package me.zhengjie.service;

import me.zhengjie.domain.AppWorkConfig;
import me.zhengjie.service.dto.AppWorkConfigDto;
import me.zhengjie.service.dto.AppWorkConfigQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @website https://el-admin.vip
* @description 服务接口
* @author IQW
* @date 2022-07-13
**/
public interface AppWorkConfigService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(AppWorkConfigQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<AppWorkConfigDto>
    */
    List<AppWorkConfigDto> queryAll(AppWorkConfigQueryCriteria criteria);

    List<AppWorkConfig> queryAllOrg(AppWorkConfigQueryCriteria criteria);

    //每天生成新任务
    //configId 0表示所有，>0表示当前ID
    Boolean actWorkConfig(Integer configId);

    //设置自动过期
    Boolean setWorkConfigExp();

    /**
     * 根据ID查询
     * @param configId ID
     * @return AppWorkConfigDto
     */
    AppWorkConfigDto findById(Integer configId);

    /**
    * 创建
    * @param resources /
    * @return AppWorkConfigDto
    */
    AppWorkConfigDto create(AppWorkConfig resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(AppWorkConfig resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Integer[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<AppWorkConfigDto> all, HttpServletResponse response) throws IOException;
}